  
<html>
<head>
<title>Hello World Window</title>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.3.1/resources/css/ext-all.css"/>
    <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.3.1/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.3.1/ext-all-debug.js"></script>

</head>
<body>
<script type="text/javascript">
    Ext.onReady(function() {
        Ext.QuickTips.init();
        var login = new Ext.form.TextField({
            fieldLabel: 'Login',
            name: 'txt-name',
            value: 'Your login',
            id: "txtLogin"
        });
        var email = new Ext.form.TextField({
            fieldLabel: 'Email',
            name: 'txt-email',
            value: 'email@server.com',
            id: "txtEmail"
        });
        var mySimpleStore = new Ext.data.ArrayStore({
            data: [
				['User'],
				['Adminstrator'],
				['Anonymous'],
				['Other']
			],
            fields: ['name']
        });
        var combo = {
            id: 'cmbJob',
            xtype: 'combo',
            fieldLabel: 'Job',
            store: mySimpleStore,
            displayField: 'name',
            typeAhead: true,
            mode: 'local',
            editable: true
        }
        var check = {
            id: 'cbActive',
            xtype: 'checkbox',
            fieldLabel: 'Active'
        }



        var form = new Ext.FormPanel({
            border: false,
            items: [
						login,
						email,
						combo,
						check,
					],
            buttons: [
			{
			    text: 'Ok',
			    id: 'btnOk'
			},
			{
			    text: 'Clear',
			    id: 'btnClear'
			}
		]
        });
        new Ext.Window({
            title: 'A Title',
            id: 'FormWindow',
            height: 200,
            width: 320,
            layout: 'form',
            labelWidth: 80,
            bodyStyle: 'background-color:#fff;padding: 10px',
            items: form
        }).show()

        /*Some comportamental behavior */
        var btnOk = Ext.getCmp('btnOk');
        btnOk.on('click', function() {
            Ext.getCmp('FormWindow').close();
            Ext.MessageBox.alert('Window', 'Ok Pressed');
        });

        var btnOk = Ext.getCmp('btnClear');
        btnOk.on('click', function() {
            Ext.getCmp('txtLogin').setValue('');
            Ext.getCmp('txtEmail').setValue('');
            Ext.getCmp('cmbJob').setValue('');
            Ext.getCmp('cbActive').setValue(false);
        });
    });
</script> 
<div id='div1'></div>
</body>
</html>
